//
//  ViewController.m
//  SVProgressHUD的使用
//
//  Created by clz on 2019/10/5.
//  Copyright © 2019 clz. All rights reserved.
//

#import "ViewController.h"
#import <SVProgressHUD.h>
#import <Masonry.h>

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setTitle:@"弹出" forState:UIControlStateNormal];
    [button setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    [button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self.view);
        make.size.mas_equalTo(CGSizeMake(100, 100));
    }];
    
    [SVProgressHUD setBackgroundColor:[UIColor yellowColor]];
    [SVProgressHUD setMinimumDismissTimeInterval:1];
}

- (void)buttonAction:(UIButton *)sender{
//    [SVProgressHUD showErrorWithStatus:@"请求出错"];
//    [SVProgressHUD showSuccessWithStatus:@"请求成功"];
    [SVProgressHUD showWithStatus:@"登录中..."];
    
//    [SVProgressHUD dismiss];
}


@end
